import sys

tmp_dir = sys.argv[0].split('/')
home_dir = ''
for i in range(len(tmp_dir) - 1):
    home_dir = home_dir + tmp_dir[i] + '/'

fin = open('%s/keyword' % (home_dir), 'r')
fout = open('%s/keywordlist' % (home_dir), 'w')

fout.write('{\n')
flag = 0
while 1 + 1 == 2:
    l = fin.readline().replace('\r', '').replace('\n', '')
    if not len(l):
	break
    if flag:
	fout.write(',\n')
    l = l.split(':')
    fout.write("'%s':'%s'" % (l[0], l[1]))
    flag = 1

fout.write('\n}')
    
